// 用户和速递员信息项
<template>
  <div class="info">
    <el-descriptions class="margin-top" :title="'用户: ' + username" :column="3" border>
      <template slot="extra">
        <el-button type="primary" size="small">查看</el-button>
        <el-button type="primary" size="small">删除</el-button>
      </template>
      <!-- 姓名 -->
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-user"></i>
          姓名
        </template>
        {{ name }}
      </el-descriptions-item>
      <!--  -->
      <!-- 手机号 -->
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-mobile-phone"></i>
          手机号
        </template>
        {{ telephone }}
      </el-descriptions-item>
      <!--  -->
      <!-- 学号 -->
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-edit-outline"></i>
          学号
        </template>
        {{ Sno }}
      </el-descriptions-item>
      <!--  -->
      <!-- 状态 -->
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-edit"></i>
          状态
        </template>
        <el-tag size="small">{{ tag }}</el-tag>
      </el-descriptions-item>
      <!--  -->
      <!-- 联系地址 -->
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-office-building"></i>
          联系地址
        </template>
        {{ address }}
      </el-descriptions-item>
      <!--  -->
      <!-- 是否在校学生 -->
      <el-descriptions-item>
        <template slot="label">
          <i class="el-icon-location-outline"></i>
          是否在校学生
        </template>
        {{ status === true ? '是' : '否' }}
      </el-descriptions-item>
    </el-descriptions>
    <!--  -->
  </div>
</template>

<script>
export default {
  props: {
    username: {
      type: String,
      required: true
    },
    name: {
      type: String,
      required: true
    },
    telephone: {
      type: String,
      required: true
    },
    status: {
      type: Boolean
    },
    tag: {
      type: String,
      default: 'stuying'
    },
    address: {
      type: String,
      required: true
    },
    Sno: {
      type: String,
      required: true
    }
  }
}
</script>

<style lang="less" scoped>
.info {
  margin: 15px 40px;
}
</style>
